<% if Setting.has_profile_field? :location %>
  <%= f.input :location  %>
<% end %>
<% if Setting.has_profile_field? :company %>
  <%= f.input :company %>
<% end %>
<% if Setting.has_module? :github %>
<div class="form-group">
  <%= f.label :github, class: 'control-label' %>
  <div class="input-group">
    <span class="input-group-addon">https://github.com/</span>
    <%= f.text_field :github, class: "form-control", placeholder: I18n.t('simple_form.placeholders.user.yourname') %>
  </div>
</div>
<% end %>
<% if Setting.has_profile_field? :twitter %>
<div class="form-group">
  <%= f.label :twitter, class: 'control-label' %>
  <div class="input-group">
    <span class="input-group-addon">https://twitter.com/</span>
    <%= f.text_field :twitter, class: "form-control", placeholder: I18n.t('simple_form.placeholders.user.yourname') %>
  </div>
</div>
<% end %>
<% if Setting.has_profile_field? :website %>
  <%= f.input :website, type: :url, input_html: { placeholder: "http://" } %>
<% end %>

<% User::PROFILE_FILEDS.each do |field| %>
  <%
  next if !Setting.has_profile_field? field
  %>
  <%
  field_prefix = User.profile_field_prefix(field)
  %>
<div class="form-group form-group-profile-field-<%= field %>">
  <label class="control-label" for="user_profile_<%= field %>"><%= User.profile_field_label(field) %></label>
  <% if field_prefix %>
    <div class="input-group">
      <span class="input-group-addon"><%= field_prefix %></span>
  <% end %>
  <input class="form-control" type="text" value="<%= @user.profile_field(field) %>" name="user[profiles][<%= field %>]" id="user_profile_<%= field %>">
  <% if field_prefix %></div><% end %>
</div>
<% end %>

<% if Setting.has_profile_field? :tagline %>
  <%= f.input :tagline %>
<% end %>